package com.zhanghe.study.spring4.beans.annotationtest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @author zh
 * @date 2021/1/5 10:30
 */
@Controller
public class UserController {
    @Autowired(required = false)
    private UserService userService;

    public void save(){
        System.out.println("UserController执行save()");
        userService.save();
    }
}
